package org.oslims.client.view.impl;

import org.oslims.client.uicomponents.editbox.SelectRequestBox;
import org.oslims.client.view.SampleEditorRootView;

import com.google.gwt.dom.client.Style.Unit;
import com.google.gwt.user.client.ui.DockLayoutPanel;
import com.google.gwt.user.client.ui.HasText;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.ScrollPanel;
import com.google.gwt.user.client.ui.TabPanel;
import com.google.gwt.user.client.ui.VerticalPanel;

public class SampleEditorRootViewImpl extends BaseViewImpl implements SampleEditorRootView {

	TabPanel samplesTab = new TabPanel();

	Label header = new Label();
	private SelectRequestBox selectRequestBox;

	public SampleEditorRootViewImpl() {

		DockLayoutPanel content = new DockLayoutPanel(Unit.PCT);
		content.setStyleName("mainContent");

		VerticalPanel headerPanel = new VerticalPanel();

		headerPanel.add(header);
		header.setStyleName("viewHeader");

		content.addNorth(headerPanel, 5);

		ScrollPanel tablePanel = new ScrollPanel();
		tablePanel.add(samplesTab);

		content.add(tablePanel);

		initWidget(content);
	}

	@Override
	public TabPanel getSampleTabPanel() {
		return samplesTab;
	}

	@Override
	public HasText getHeaderLabel() {
		return header;
	}

	@Override
	public SelectRequestBox getSelectRequestBox() {
		return selectRequestBox;
	}

	@Override
	public void setSelectRequestBox(SelectRequestBox selectRequestBox) {
		this.selectRequestBox = selectRequestBox;
	}
}
